package com.example.controller.appversion;

import com.example.pojo.appversion.AppVersion;
import com.example.service.appversion.AppVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.List;

@Controller
@ResponseBody
@RequestMapping("appversion")
public class AppVersionController {
    @Autowired
    private AppVersionService appVersionService;

    /**
     * 功能描述: <br>
     * 〈〉//查询app全部历史版本信息
     * @Param: []
     * @Return: java.util.List<com.example.pojo.AppVersion>
     * @Author: 10260
     * @Date: 2022/12/7 19:23
     */
    @RequestMapping("appVersionGetAll")
    public List<AppVersion> appVersionGetAll(){
        List<AppVersion> appVersions = appVersionService.appVersionsGetAll();
        return appVersions;
    }
    //添加版本
    /*@RequestMapping("appVersionAdd")
    public String appVersionAdd(AppVersion appVersion){
        appVersion.setCreateDate(new java.sql.Date(new Date().getTime()));
        String res = "添加失败";
        Boolean b = appVersionService.appVersionAdd(appVersion);
        if(b){
            res = "添加成功";
        }
        return res;
    }*/
}
